<?php
/**
 * DotHerbert
 *
 * @package    UnitTest
 * @copyright  2009 extreme-programmers
 * @license    http://dotherbert.extreme-programmers.com/license   BSD License
 * @version    $Id: TestCaseIterator.php 102 2009-05-13 17:19:29Z johannes.trink@extreme-programmers.com $
 */

namespace dotherbert\unittest;

/**
 * TestCase iterator
 *
 * @package    UnitTest
 * @author     Johannes Trink <johannes.trink@extreme-programmers.com>
 */
class TestCaseIterator extends \FilterIterator
{
    /**
     * Accept
     *
     * @return bool
     */
    public function accept()
    {
        $file = $this->getInnerIterator()->current();
        return (($file->isFile()) and ('Test.php' == substr($file->getFilename(), -8)));
    }
}